package com.rd.student.dashuju.zhengruixian.test0726;

public class TestSynchronized implements Runnable{
    @Override
    public void run(){
        synchronized (this){
            System.out.println("同步代码块");
        }
    }

    public static void main(String[] args) {
        TestSynchronized ts=new TestSynchronized();
        Thread t=new Thread(ts);
        t.start();
    }
}
